home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 December
/
1984-12.d64
/
word guess_64
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
142 lines
9 n=100:gt=30
10 gosub877
15 poke53280,2:poke53281,1:print"[147][154] "
17 v=54296:w=54276:a=54277:h=54273:l=54272:s=54278
20 dim le$(10),mi$(15),di$(10),wu(n),wd$(n),al$(27)
25 fori=1ton:readwd$(i):wu(i)=0:next
26 fori=1to27:readal$(i):next
28 gosub503
30 rn=int(n*rnd(1))+1
35 ifwu(rn)=1then110
40 wu(rn)=1
50 ln=len(wd$(rn))
55 fori=1toln:gn$=mid$(wd$(rn),i,1):le$(i)=gn$:next
80 print"[147]";tab(13);"guess this word"
85 v1=1205-ln:v2=1285-ln
90 fori=1toln:pokev1,32:pokev2,67:pokev1+l,0:pokev2+l,0:v1=v1+2:v2=v2+2:next
102 print"enter your guess "
104 print"letters guessed so far:"
106 it=ti/60
107 tl=ti:tv=tl-60:tu=gt*60
108 getgs$:ifgs$<>""then112
109 gosub310:iftu=0thengs$=chr$(45):goto115
110 ifgs$=""then108
112 iflen(gs$)>1then108
113 ifasc(gs$)<65orasc(gs$)>90then108
115 gu=gu+1
120 mi$(gu)=gs$
125 fori=1toln
130 ifle$(i)=di$(i)then145
140 ifgs$=le$(i)thendi$(i)=gs$:gosub610
145 nexti
160 forj=1to27
170 ifmi$(gu)=al$(j)then177
173 nextj
177 v3=1525-ln-5+gu*2-2
178 ifj=27thenj=45
180 pokev3,j:pokev3+l,0
185 gl=0:gl=ln+5-gu
190 print"guesses left: [157][157][157][157][157][157]";gl
195 ag=1
200 fori=1toln:ifdi$(i)<>le$(i)thenag=0
202 nexti
204 ifag=0andgl>0then107
206 et=ti/60:ft=int(et-it):tm=int(ft/60):ts=ft-(tm*60)
208 ba$=str$(ts):sa$=mid$(ba$,2,2)
210 ifts<10thensa$="0"+mid$(ba$,2,1)
214 print"";tab(20);"guess time";tm;chr$(58);sa$
215 ifgl=0andag=0thengosub705
220 ifag=1thengosub810
225 print"[144]f3 to quit"
230 print"f5 to go to a different word[154]"
235 getac$:ifac$=""then235
240 ifac$="[135]"then28
245 ifac$="[134]"then print"[147]":end
250 goto235
310 tv=tv+60
320 tm=ti-tv
330 iftm<60then320
340 tu=(gt*60-tv+tl)/60
350 b$=str$(tu)
360 s$=mid$(b$,2,2)
370 iftu<10thens$="0"+mid$(b$,2,1)
380 print"";tab(24);"time : ";s$
390 return
503 sp$=" "
505 fori=1to10:le$(i)=sp$:mi$(i)=sp$:di$(i)=sp$:pk(i)=32:pm(i)=32:next
510 fori=11to15:mi$(i)=sp$:next
530 gu=0
540 return
610 forj=1to26
620 ifdi$(i)=al$(j)then625
623 nextj
625 v1=1205-ln+i*2-2
630 pokev1,j:pokevi+l,0
635 pokev,15:pokew,33:pokea,32:pokes,240
640 fort=1to10:pokeh,68:pokel,149:next
645 pokeh,0:pokel,0:pokew,0
650 fort=1to150:next
655 return
705 print" sorry, you missed the word"
710 print" it was ";wd$(rn)
715 pokev,15:pokew,33:pokea,32:pokes,240
720 fort=1to200:pokeh,6:pokel,16:next
725 pokeh,0:pokel,0:pokew,0
730 return
810 print" *** congratulations ***"
815 pokev,15:pokew,33:pokea,32:pokes,240
820 fort=1to25:pokeh,68:pokel,149:next
825 pokeh,0:pokel,0
830 fort=1to100:pokeh,68:pokel,149:next
835 pokeh,0:pokel,0:pokew,0
850 return
877 poke53281,15:poke53280,10
880 print"[147] [144]w o r d - g u e s s"
890 print:print:print" instructions (y/n)"
895 getab$:ifab$=""then895
897 ifab$<>"y"then975
905 poke53281,13:poke53280,3
910 printchr$(144);"[147] word-guess":print
915 print" the object of word-guess is to de-"
920 print"termine the letters that makeup a word."
922 print" the word can be up to 10 characters"
924 print"long. you have 5 more guesses than the"
926 print"length of the word to determine all the"
928 print"letters."
932 print" you have";gt;"seconds to make a guess."
934 print"if the letter is in the word, it will"
936 print"show in its proper slot. all letters"
938 print"used will be displayed for reference."
940 print" multiple occurences of the same"
942 print"letter will be shown in all appropriate"
944 print"slots.":print
946 print" after guessing a word, press:"
948 print" f3[146] to quit":printtab(8)"or"
950 print" f5[146] to guess another word"
952 print:printtab(15);"good luck!"
954 printtab(8);"press any key to start"
956 getad$:ifad$=""then956
975 return
1000 data degree,division,scrod,naive,thinker
1005 data water,light,regime,revamp,hymn
1010 data regency,sympathy,coupon,plant,spotlight
1015 data express,aardvark,rubber,eminence,boomerang
1020 data poetic,earthquake,mail,paralyze,heat
1025 data lapse,nitrogen,glass,idiot,memory
1030 data flower,computer,landmark,message,clarity
1035 data amazing,harmony,gallon,jellyfish,flame
1040 data envious,doorbell,destiny,daisy,corsage
1045 data canary,boycott,offer,beneficial,armadillo
1050 data angelic,month,balmy,margarine,lodge
1055 data original,oxygen,skiing,plasma,premature
1060 data special,regard,refugee,shake,watercress
1065 data saloon,washable,whatever,yolk,window
1070 data action,zenith,yellow,tricycle,yam
1075 data fetch,price,chemical,downwind,hibernate
1080 data counteract,cloverleaf,earthquake,flexible,queen
1085 data precedent,orange,construct,unicorn,important
1090 data medalist,yourself,novice,geography,expensive
1100 data monitor,headache,television,tax,language
2000 data a,b,c,d,e,f,g,h,i,j,k,l,m
2010 data n,o,p,q,r,s,t,u,v,w,x,y,z,-